Optimal. Leaf size=258 \[ \frac {363 (-1)^{3/4} a^{5/2} \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{64 d}+\frac {(4+4 i) a^{5/2} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {149 i a^2 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{64 d}+\frac {107 a^2 \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{96 d}+\frac {17 i a^2 \tan ^{\frac {5}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{24 d}-\frac {a^2 \tan ^{\frac {7}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.52, antiderivative size = 258, normalized size of antiderivative = 1.00, number of steps
used = 11, number of rules used = 9, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.321, Rules used = {3637, 3678,
3682, 3625, 211, 3680, 65, 223, 209} \begin {gather*} \frac {363 (-1)^{3/4} a^{5/2} \text {ArcTan}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{64 d}+\frac {(4+4 i) a^{5/2} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {a^2 \tan ^{\frac {7}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}+\frac {17 i a^2 \tan ^{\frac {5}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{24 d}+\frac {107 a^2 \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{96 d}-\frac {149 i a^2 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{64 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 65
Rule 209
Rule 211
Rule 223
Rule 3625
Rule 3637
Rule 3678
Rule 3680
Rule 3682
Rubi steps
\begin {align*} \int \tan ^{\frac {5}{2}}(c+d x) (a+i a \tan (c+d x))^{5/2} \, dx &=-\frac {a^2 \tan ^{\frac {7}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}+\frac {1}{4} a \int \tan ^{\frac {5}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)} \left (\frac {15 a}{2}+\frac {17}{2} i a \tan (c+d x)\right ) \, dx\\ &=\frac {17 i a^2 \tan ^{\frac {5}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{24 d}-\frac {a^2 \tan ^{\frac {7}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}+\frac {1}{12} \int \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)} \left (-\frac {85 i a^2}{4}+\frac {107}{4} a^2 \tan (c+d x)\right ) \, dx\\ &=\frac {107 a^2 \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{96 d}+\frac {17 i a^2 \tan ^{\frac {5}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{24 d}-\frac {a^2 \tan ^{\frac {7}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}+\frac {\int \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)} \left (-\frac {321 a^3}{8}-\frac {447}{8} i a^3 \tan (c+d x)\right ) \, dx}{24 a}\\ &=-\frac {149 i a^2 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{64 d}+\frac {107 a^2 \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{96 d}+\frac {17 i a^2 \tan ^{\frac {5}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{24 d}-\frac {a^2 \tan ^{\frac {7}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}+\frac {\int \frac {\sqrt {a+i a \tan (c+d x)} \left (\frac {447 i a^4}{16}-\frac {1089}{16} a^4 \tan (c+d x)\right )}{\sqrt {\tan (c+d x)}} \, dx}{24 a^2}\\ &=-\frac {149 i a^2 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{64 d}+\frac {107 a^2 \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{96 d}+\frac {17 i a^2 \tan ^{\frac {5}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{24 d}-\frac {a^2 \tan ^{\frac {7}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}-\frac {1}{128} (363 i a) \int \frac {(a-i a \tan (c+d x)) \sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx+\left (4 i a^2\right ) \int \frac {\sqrt {a+i a \tan (c+d x)}}{\sqrt {\tan (c+d x)}} \, dx\\ &=-\frac {149 i a^2 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{64 d}+\frac {107 a^2 \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{96 d}+\frac {17 i a^2 \tan ^{\frac {5}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{24 d}-\frac {a^2 \tan ^{\frac {7}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}-\frac {\left (363 i a^3\right ) \text {Subst}\left (\int \frac {1}{\sqrt {x} \sqrt {a+i a x}} \, dx,x,\tan (c+d x)\right )}{128 d}+\frac {\left (8 a^4\right ) \text {Subst}\left (\int \frac {1}{-i a-2 a^2 x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}\\ &=\frac {(4+4 i) a^{5/2} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {149 i a^2 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{64 d}+\frac {107 a^2 \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{96 d}+\frac {17 i a^2 \tan ^{\frac {5}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{24 d}-\frac {a^2 \tan ^{\frac {7}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}-\frac {\left (363 i a^3\right ) \text {Subst}\left (\int \frac {1}{\sqrt {a+i a x^2}} \, dx,x,\sqrt {\tan (c+d x)}\right )}{64 d}\\ &=\frac {(4+4 i) a^{5/2} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {149 i a^2 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{64 d}+\frac {107 a^2 \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{96 d}+\frac {17 i a^2 \tan ^{\frac {5}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{24 d}-\frac {a^2 \tan ^{\frac {7}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}-\frac {\left (363 i a^3\right ) \text {Subst}\left (\int \frac {1}{1-i a x^2} \, dx,x,\frac {\sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{64 d}\\ &=\frac {363 (-1)^{3/4} a^{5/2} \tan ^{-1}\left (\frac {(-1)^{3/4} \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{64 d}+\frac {(4+4 i) a^{5/2} \tanh ^{-1}\left (\frac {(1+i) \sqrt {a} \sqrt {\tan (c+d x)}}{\sqrt {a+i a \tan (c+d x)}}\right )}{d}-\frac {149 i a^2 \sqrt {\tan (c+d x)} \sqrt {a+i a \tan (c+d x)}}{64 d}+\frac {107 a^2 \tan ^{\frac {3}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{96 d}+\frac {17 i a^2 \tan ^{\frac {5}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{24 d}-\frac {a^2 \tan ^{\frac {7}{2}}(c+d x) \sqrt {a+i a \tan (c+d x)}}{4 d}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 4.39, size = 232, normalized size = 0.90 \begin {gather*} \frac {a^2 \left (\frac {6 e^{-i (c+d x)} \sqrt {-1+e^{2 i (c+d x)}} \left (512 \tanh ^{-1}\left (\frac {e^{i (c+d x)}}{\sqrt {-1+e^{2 i (c+d x)}}}\right )-363 \sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {2} e^{i (c+d x)}}{\sqrt {-1+e^{2 i (c+d x)}}}\right )\right )}{\sqrt {-\frac {i \left (-1+e^{2 i (c+d x)}\right )}{1+e^{2 i (c+d x)}}}}-i \sec ^3(c+d x) (1205 \cos (c+d x)+583 \cos (3 (c+d x))+70 i \sin (c+d x)+262 i \sin (3 (c+d x))) \sqrt {\tan (c+d x)}\right ) \sqrt {a+i a \tan (c+d x)}}{768 d} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 493 vs. \(2 (204 ) = 408\).
time = 0.20, size = 494, normalized size = 1.91
method | result | size |
derivativedivides | \(-\frac {\left (\sqrt {\tan }\left (d x +c \right )\right ) \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, a^{2} \left (-272 i \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \left (\tan ^{2}\left (d x +c \right )\right )+96 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \left (\tan ^{3}\left (d x +c \right )\right )+384 i \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \sqrt {i a}\, a +1089 i \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a +894 i \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}+384 \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a -428 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \tan \left (d x +c \right )+1536 \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) a \sqrt {-i a}\right )}{384 d \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}}\) | \(494\) |
default | \(-\frac {\left (\sqrt {\tan }\left (d x +c \right )\right ) \sqrt {a \left (1+i \tan \left (d x +c \right )\right )}\, a^{2} \left (-272 i \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \left (\tan ^{2}\left (d x +c \right )\right )+96 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \left (\tan ^{3}\left (d x +c \right )\right )+384 i \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) \sqrt {i a}\, a +1089 i \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) \sqrt {-i a}\, a +894 i \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}+384 \sqrt {i a}\, \sqrt {2}\, \ln \left (-\frac {-2 \sqrt {2}\, \sqrt {-i a}\, \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}+i a -3 a \tan \left (d x +c \right )}{\tan \left (d x +c \right )+i}\right ) a -428 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}\, \tan \left (d x +c \right )+1536 \ln \left (\frac {2 i a \tan \left (d x +c \right )+2 \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}+a}{2 \sqrt {i a}}\right ) a \sqrt {-i a}\right )}{384 d \sqrt {a \tan \left (d x +c \right ) \left (1+i \tan \left (d x +c \right )\right )}\, \sqrt {i a}\, \sqrt {-i a}}\) | \(494\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [B] Both result and optimal contain complex but leaf count of result is larger than twice
the leaf count of optimal. 769 vs. \(2 (192) = 384\).
time = 0.41, size = 769, normalized size = 2.98 \begin {gather*} \frac {\sqrt {2} {\left (-845 i \, a^{2} e^{\left (7 i \, d x + 7 i \, c\right )} - 1275 i \, a^{2} e^{\left (5 i \, d x + 5 i \, c\right )} - 1135 i \, a^{2} e^{\left (3 i \, d x + 3 i \, c\right )} - 321 i \, a^{2} e^{\left (i \, d x + i \, c\right )}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} + 96 \, \sqrt {\frac {131769 i \, a^{5}}{4096 \, d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (363 \, \sqrt {2} {\left (a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{2}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} + 128 i \, \sqrt {\frac {131769 i \, a^{5}}{4096 \, d^{2}}} d e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{363 \, a^{2}}\right ) - 96 \, \sqrt {\frac {131769 i \, a^{5}}{4096 \, d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (363 \, \sqrt {2} {\left (a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{2}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} - 128 i \, \sqrt {\frac {131769 i \, a^{5}}{4096 \, d^{2}}} d e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{363 \, a^{2}}\right ) - 96 \, \sqrt {\frac {32 i \, a^{5}}{d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (4 \, \sqrt {2} {\left (a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{2}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} + i \, \sqrt {\frac {32 i \, a^{5}}{d^{2}}} d e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{4 \, a^{2}}\right ) + 96 \, \sqrt {\frac {32 i \, a^{5}}{d^{2}}} {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )} \log \left (\frac {{\left (4 \, \sqrt {2} {\left (a^{2} e^{\left (2 i \, d x + 2 i \, c\right )} + a^{2}\right )} \sqrt {\frac {a}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} \sqrt {\frac {-i \, e^{\left (2 i \, d x + 2 i \, c\right )} + i}{e^{\left (2 i \, d x + 2 i \, c\right )} + 1}} - i \, \sqrt {\frac {32 i \, a^{5}}{d^{2}}} d e^{\left (i \, d x + i \, c\right )}\right )} e^{\left (-i \, d x - i \, c\right )}}{4 \, a^{2}}\right )}{192 \, {\left (d e^{\left (6 i \, d x + 6 i \, c\right )} + 3 \, d e^{\left (4 i \, d x + 4 i \, c\right )} + 3 \, d e^{\left (2 i \, d x + 2 i \, c\right )} + d\right )}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: SystemError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F(-2)]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Exception raised: TypeError} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.00 \begin {gather*} \int {\mathrm {tan}\left (c+d\,x\right )}^{5/2}\,{\left (a+a\,\mathrm {tan}\left (c+d\,x\right )\,1{}\mathrm {i}\right )}^{5/2} \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________